package com.feihao.zhou.demo02Test.service;

import com.feihao.zhou.demo02Test.dao.StudentDao;
import com.feihao.zhou.demo02Test.dao.StudentDaoImpl;
import com.feihao.zhou.demo02Test.domain.Student;

import java.util.List;

public class StudentServiceImpl implements StudentService {

    private StudentDao studentDao = new StudentDaoImpl();

    @Override
    public List<Student> findAll() {
        return studentDao.findAll();
    }

    @Override
    public Student findByID(Integer id) {
        return studentDao.findById(id);
    }

    @Override
    public int insert(Student stu) {
        return studentDao.insert(stu);
    }

    @Override
    public int update(Integer sid) {
        return studentDao.update(sid);
    }

    @Override
    public int delete(Integer id) {
        return studentDao.delete(id);
    }
}
